SOURCE
100 REM Sample BETTER BASIC VERSION 2.0 program 
101 REM Calls IBM BASICA interface SORTIBAS
110 OPEN "SORTIBAS.SEG" FOR INPUT AS #1
120 INPUT #1, SEGADDR          ' READ DEF SEG ADDR 
130 DEF SEG   = SEGADDR        ' ASSIGN DEF SEG
140 INFILE$   = "SAMP.DAT"
150 OUTFILE$  = "sorted.dat"     
160 CTLSTMT$  = "S(1,24,C,A)"
170 SORTIBAS  = 0              ' DEFINE OFFSET
180 PRINT "CALLING OPT-TECH SORT ..."
190 CALL SORTIBAS(INFILE$,OUTFILE$,CTLSTMT$,NUMRECS%,RETCODE%)
200 PRINT "BACK FROM OPT-TECH SORT"
210 PRINT "NUMBER OF RECORDS = ",NUMRECS%
220 PRINT "SORT STATUS       = ",RETCODE%
ENDFILE
